#ifndef LIMAGE_H
#define LIMAGE_H
#include <QImage>
#include <iostream>
#include <QString>

#include "histogram.h"
#include "histogramGray.h"
#include "histogramRGB.h"
#include "histogramhsi.h"
using namespace std ;
using std::cout;
using std::cin;

class LImage
{
private :
    QImage image;
    LImage mergeGrayImage(double,LImage,double);
    LImage mergeColorImage(double,LImage,double);
    LImage RGBhistogramEqulization();
    LImage grayHistogramEqualization();


public:
    Histogram*  historgram;
    LImage();
    LImage(QImage qImage);
    LImage(int,int,QImage::Format);
    LImage(QString);
    LImage(QString,char);
    LImage  convertToGrayScale();

    LImage convertToNegative();
    QImage getImage();
    LImage convertToColorNegative();


    void loadLimage(QString path);
    void saveImage(QString);
    LImage normalizeImage();
    LImage mergeImage(double,LImage,double);
    QRgb pixel(int,int);
    void setPixel(int,int,int,int,int);
    void setPixel(int,int,double,double,double);
    LImage histogramEqulization();
    LImage HSIHistogramEqualization();
    LImage grayHistogramStretching();
    LImage colorHSIHistogramStretching();
    LImage intelligentScissors();

};

#endif // LIMAGE_H
